﻿<Window x:Class="CPPEI.Coolzon.Designer.Views.UndoPendingChangesWindows"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.Designer.Views"
        mc:Ignorable="d"
        Title="撤销挂起的更改" Height="300" Width="600" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen"
        Style="{DynamicResource WindowStyle}">
    <Window.Resources>
        <local:NodeTypeToString x:Key="nodeTypeToString"/>
    </Window.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
        <ListView Grid.Row="0"  x:Name="_ctlFileListView">
            <ListView.View >
                <GridView>
                    <GridView.Columns>
                        <GridViewColumn>
                            <GridViewColumn.HeaderTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Center" Margin="2" Text="名称"/>
                                    </Grid>
                                </DataTemplate>
                            </GridViewColumn.HeaderTemplate>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:SolutionTreeViewNode">
                                    <StackPanel Orientation="Horizontal" Margin="0,3,0,3">
                                        <CheckBox IsChecked="{Binding Path=Tag, Mode=TwoWay}" Margin="3,0,0,0"/>
                                        <TextBlock Text="{Binding Path=Name}" Margin="5,0,0,0" ></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn>
                            <GridViewColumn.HeaderTemplate>
                                <DataTemplate >
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Center" Margin="2" Text="类型" />
                                    </Grid>
                                </DataTemplate>
                            </GridViewColumn.HeaderTemplate>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:SolutionTreeViewNode">
                                    <StackPanel Orientation="Horizontal" Margin="0,3,0,3">
                                        <TextBlock Text="{Binding Path=NodeType, Converter={StaticResource nodeTypeToString}}" Margin="5,0,0,0" ></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn>
                            <GridViewColumn.HeaderTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Center" Margin="2" Text="文件夹"/>
                                    </Grid>
                                </DataTemplate>
                            </GridViewColumn.HeaderTemplate>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:SolutionTreeViewNode">
                                    <TextBlock Text="{Binding Path=LocalPath}" Margin="10"></TextBlock>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView.Columns>
                </GridView>
            </ListView.View>
        </ListView>
        <Grid Grid.Row="1">
            <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Content="撤销修改" Margin="0,0,20,0" Click="Button_Click" />
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Name="cancel" Content="取消" Margin="20,0,0,0" Click="cancel_Click"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
